widget: Set a css name
authorBenjamin Otte <otte@redhat.com>
Thu, 4 Feb 2016 16:22:39 +0000 (17:22 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 4 Feb 2016 16:27:03 +0000 (17:27 +0100)
Now selecting a widget by class name no longer works.

This is probably most relevant for users outside of GTK that want to
style their own widgets. Those widgets should now either add their own
style classes (if they want to adjust existing CSS) or use
gtk_widget_class_set_css_name() themselves (if they want to get rid of
all "upstream" styling).

gtk/gtkwidget.c

index 3b7b0624367d2f0fdc4ac7cd19fd30eecf11bd71..bc1f78627fdb5f053ddd3a9aed212a905e70aae4 100644 (file)
@@ -3670,6 +3670,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
                                                              GTK_PARAM_READABLE));
 
   gtk_widget_class_set_accessible_type (klass, GTK_TYPE_WIDGET_ACCESSIBLE);
+  gtk_widget_class_set_css_name (klass, "widget");
 }
 
 static void